package com.microlecture.service.impl;

import com.microlecture.entity.CookbookDiscuss;
import com.microlecture.mapper.CookbookDiscussMapper;
import com.microlecture.service.CookbookDiscussService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CookbookDiscussServiceImpl implements CookbookDiscussService {

    @Autowired
    private CookbookDiscussMapper cookbookDiscussMapper;

    @Override
    public int deleteByPrimaryKey(Integer id) {
        return cookbookDiscussMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insertSelective(CookbookDiscuss record) {
        return cookbookDiscussMapper.insertSelective(record);
    }

    @Override
    public CookbookDiscuss selectByPrimaryKey(Integer id) {
        return cookbookDiscussMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(CookbookDiscuss record) {
        return cookbookDiscussMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public List<CookbookDiscuss> selectByCondition(Integer userid, Integer cookbookid) {
        return cookbookDiscussMapper.selectByCondition(userid, cookbookid);
    }
}